# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Alexandria Pettit <alxpettit@gmail.com>
# Contributor: Jorge Israel Peña <jorge.israel.p@gmail.com>
# Contributor: mrAppleXZ <mr.applexz@gmail.com>

pkgname=syncplay
pkgver=1.7.0
pkgrel=1
pkgdesc='Synchronize watching movies on mplayer2, vlc, mpv, and mpc-hc across many computers'
arch=(any)
url=http://syncplay.pl
_url="https://github.com/Syncplay/$pkgname"
license=(Apache)
depends=(python
         python-twisted)
optdepends=('pyside2: GUI'
            'python-service-identity: TLS'
            'python-certifi: TLS'
            'mplayer2: media player'
            'mpv: media player'
            'vlc: media player')
backup=("etc/$pkgname/server.conf")
_archive="$pkgname-$pkgver"
source=("$_url/archive/v$pkgver/$_archive.tar.gz"
        "$pkgname.service"
        "$pkgname.conf")
sha256sums=('d65c402869a5b5906a601cb08452363d29d7f08a4e5df0edd29676d8c0c7b81d'
            'bbbf8f9dfc36631b49ba7d0fe3f980066b30a544954680a677e5e8629b7e0a8b'
            'df3c7656024d60c59664c79f4890f7780a2c5b8b537ac61b017e16b3d4420808')

package() {
	install -Dm0644 "$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname@.service"
	install -Dm0644 "$pkgname.conf" "$pkgdir/etc/$pkgname/server.conf"
	cd "$_archive"
	make PREFIX=/usr DESTDIR="$pkgdir" install
}
